$import( "SmitearWebGL.Objects.Parser.Collada.DaeEntity" );

SmitearWebGL.Objects.Parser.Collada.DaeContributor = SmitearWebGL.Objects.Parser.Collada.DaeEntity.extend(
{
	/******** constructor ********/

	init : function( document, node )
	{
		this.author = "";
		this.authoring_tool = "";
		this.comment = "";
		this.source_data = "";
		
		this._super( document, node );
		this._registClass( "SmitearWebGL.Objects.Parser.Collada.DaeContributor" );
	}
	,

	/******** public method ********/

	read : function( node )
	{
		this._super( node );

		var authorNode = this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_AUTHOR_ASSET_PARAMETER );
		var authToolNode = this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_AUTHORINGTOOL_ASSET_PARAMETER );
		var commentNode = this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_COMMENTS_ASSET_PARAMETER );
		var sourceDataNode = this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_SOURCEDATA_ASSET_PARAMETER );

		this.author = authorNode ? authorNode.childNodes[0].nodeValue : "";
		this.authoring_tool = authToolNode ? authToolNode.childNodes[0].nodeValue : "";
		this.comment = commentNode ? commentNode.childNodes[0].nodeValue : "";
		this.source_data = sourceDataNode ? sourceDataNode.childNodes[0].nodeValue : "";
	}
	,
	write : function( indent )
	{
		indent = indent == undefined ? "" : indent;

		var xml = this.writeSimpleStartElement( SmitearWebGL.Objects.Parser.Collada.Const.DAE_CONTRIBUTOR_ASSET_ELEMENT, indent );

		xml += this.writeSimpleEndElement( SmitearWebGL.Objects.Parser.Collada.Const.DAE_CONTRIBUTOR_ASSET_ELEMENT, indent );

		return xml;
	}
}
);